home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Cafe 3
/
Visual Cafe 3.ISO
/
Vcafe
/
Main.bin
/
TitledBorderBeanInfo.java
< prev
next >
Wrap
Text File
|
1998-10-21
|
3KB
|
77 lines
package com.symantec.itools.swing.borders;
import java.beans.*;
import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
import com.symantec.itools.vcafe.beans.PropertyHelpIDs;
public final class TitledBorderBeanInfo
extends BorderBeanInfo
{
public TitledBorderBeanInfo()
{
super();
set16x16ColorIconName("TitledBorder.gif");
}
protected Class getBeanClass()
{
return TitledBorder.class;
}
public PropertyDescriptor[] getPropertyDescriptors()
{
try
{
Class beanClass = getBeanClass();
PropertyDescriptor title = new PropertyDescriptor("title", beanClass);
title.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.TITLEDBORDER_TITLE_HELP_ID));
PropertyDescriptor titlePositionPD = new PropertyDescriptor("titlePosition", beanClass);
titlePositionPD.setPropertyEditorClass(TitlePositionPropertyEditor.class);
titlePositionPD.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.TITLEDBORDER_TITLE_POSITION_HELP_ID));
PropertyDescriptor titleJustificationPD = new PropertyDescriptor("titleJustification", beanClass);
titleJustificationPD.setPropertyEditorClass(TitleJustificationPropertyEditor.class);
titleJustificationPD.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.TITLEDBORDER_TITLE_JUSTIFICATION_HELP_ID));
PropertyDescriptor borderPD = new PropertyDescriptor("border", beanClass);
borderPD.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_DEFAULT_IS_NONE_ATTRIBUTE,Boolean.TRUE);
borderPD.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.TITLEDBORDER_BORDER_HELP_ID));
PropertyDescriptor titleFont = new PropertyDescriptor("titleFont", beanClass);
titleFont.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.TITLEDBORDER_TITLE_FONT_HELP_ID));
PropertyDescriptor titleColor = new PropertyDescriptor("titleColor", beanClass);
titleColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.TITLEDBORDER_TITLE_COLOR_HELP_ID));
PropertyDescriptor[] rv = {
title,
borderPD,
titlePositionPD,
titleJustificationPD,
titleFont,
titleColor };
return rv;
}
catch(IntrospectionException e)
{
e.printStackTrace();
}
//Error, return no properties
return new PropertyDescriptor[0];
}
protected void modifyBeanDescriptor(BeanDescriptor beanDescriptor)
{
super.modifyBeanDescriptor(beanDescriptor);
beanDescriptor.setValue("WINHELP", winHelpID);
}
protected final static String winHelpID = "0x60136";
}